<!DOCTYPE html>
<html >
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>层级选择器</title>
    <style>
        div{
            border: 1px solid red;
            padding: 10px;
        }
        /*层级选择器之:后代选择器  */
        .box span{
            color: blue;
        }
        /*层级选择器之:子选择器*/
        .box > span{
            color: green;
        }

    </style>
</head>
<body>
    <div class="box">
        <span>第一层</span>
        <div>
            <span>第二层</span>
            <div>
                <span>第三次</span>
            </div>
        </div>
    </div>
</body>
</html>